package moc.egg;
import moc.compiler.*;
import moc.tds.*;
import moc.type.*;
import moc.gc.*;
import java.util.*;
import mg.egg.eggc.runtime.libjava.lex.*;
import mg.egg.eggc.runtime.libjava.*;
import mg.egg.eggc.runtime.libjava.messages.*;
import mg.egg.eggc.runtime.libjava.problem.IProblem;
import java.util.Vector;
public class S_INSTS_MOC {
LEX_MOC scanner;
  S_INSTS_MOC() {
    }
  S_INSTS_MOC(LEX_MOC scanner, boolean eval) {
    this.scanner = scanner;
    this.att_eval = eval;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  boolean att_ret;
  int att_targs;
  int att_taillev;
  int att_hdep;
  boolean att_eval;
  DTYPE att_rtype;
  String att_code;
  IMachine att_machine;
  int att_dep;
  TDS att_tds;
  LEX_MOC att_scanner;
  private void regle18() throws Exception {

    //declaration
    //appel
if  (att_eval)      action_code_18();
  }
  private void regle19() throws Exception {

    //declaration
    S_INST_MOC x_3 = new S_INST_MOC(scanner,att_eval) ;
    S_INSTS_MOC x_5 = new S_INSTS_MOC(scanner,att_eval) ;
    //appel
if  (att_eval)      action_auto_inh_19(x_3, x_5);
if  (att_eval)      action_hdep_19(x_3, x_5);
    x_3.analyser() ;
if  (att_eval)      action_hdep1_19(x_3, x_5);
    x_5.analyser() ;
if  (att_eval)      action_code_19(x_3, x_5);
  }
private void action_hdep_19(S_INST_MOC x_3, S_INSTS_MOC x_5) throws Exception {
try {
// instructions
x_3.att_hdep=this.att_hdep;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#hdep","INSTS -> #hdep INST #hdep1 INSTS1 #code ;"});
}
  }
private void action_auto_inh_19(S_INST_MOC x_3, S_INSTS_MOC x_5) throws Exception {
try {
// instructions
x_3.att_tds=this.att_tds;
x_5.att_tds=this.att_tds;
x_3.att_rtype=this.att_rtype;
x_5.att_rtype=this.att_rtype;
x_3.att_targs=this.att_targs;
x_5.att_targs=this.att_targs;
x_3.att_machine=this.att_machine;
x_5.att_machine=this.att_machine;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#auto_inh","INSTS -> #hdep INST #hdep1 INSTS1 #code ;"});
}
  }
private void action_hdep1_19(S_INST_MOC x_3, S_INSTS_MOC x_5) throws Exception {
try {
// instructions
x_5.att_hdep=x_3.att_dep;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#hdep1","INSTS -> #hdep INST #hdep1 INSTS1 #code ;"});
}
  }
private void action_code_19(S_INST_MOC x_3, S_INSTS_MOC x_5) throws Exception {
try {
// instructions
this.att_ret=x_3.att_ret||x_5.att_ret;
this.att_dep=x_5.att_dep;
this.att_code=x_3.att_code+x_5.att_code;
this.att_taillev=x_3.att_taillev+x_5.att_taillev;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","INSTS -> #hdep INST #hdep1 INSTS1 #code ;"});
}
  }
private void action_code_18() throws Exception {
try {
// instructions
this.att_ret=false;
this.att_dep=this.att_hdep;
this.att_code="";
this.att_taillev=0;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","INSTS -> #code ;"});
}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MOC.token_acf : // 35
        regle18 () ;
      break ;
      case LEX_MOC.token_void : // 42
        regle19 () ;
      break ;
      case LEX_MOC.token_int : // 44
        regle19 () ;
      break ;
      case LEX_MOC.token_char : // 45
        regle19 () ;
      break ;
      case LEX_MOC.token_entier : // 69
        regle19 () ;
      break ;
      case LEX_MOC.token_chaine : // 71
        regle19 () ;
      break ;
      case LEX_MOC.token_caractere : // 70
        regle19 () ;
      break ;
      case LEX_MOC.token_plus : // 55
        regle19 () ;
      break ;
      case LEX_MOC.token_moins : // 56
        regle19 () ;
      break ;
      case LEX_MOC.token_non : // 62
        regle19 () ;
      break ;
      case LEX_MOC.token_null : // 47
        regle19 () ;
      break ;
      case LEX_MOC.token_paro : // 32
        regle19 () ;
      break ;
      case LEX_MOC.token_ident : // 72
        regle19 () ;
      break ;
      case LEX_MOC.token_mult : // 58
        regle19 () ;
      break ;
      case LEX_MOC.token_new : // 63
        regle19 () ;
      break ;
      case LEX_MOC.token_taille : // 65
        regle19 () ;
      break ;
      case LEX_MOC.token_libere : // 64
        regle19 () ;
      break ;
      case LEX_MOC.token_aco : // 34
        regle19 () ;
      break ;
      case LEX_MOC.token_si : // 39
        regle19 () ;
      break ;
      case LEX_MOC.token_tantque : // 40
        regle19 () ;
      break ;
      case LEX_MOC.token_retour : // 46
        regle19 () ;
      break ;
      case LEX_MOC.token_asm : // 43
        regle19 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMOCMessages.id_MOC_unexpected_token,MOCMessages.MOC_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
